import com.service.GoodsService02;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TxTest02 {
    @Test
    public void test1(){
        ClassPathXmlApplicationContext ioc = new ClassPathXmlApplicationContext("tx_ioc.xml");
        System.out.println("购买商品");
        GoodsService02 bean = ioc.getBean(GoodsService02.class);
        bean.buyGoodsByTx(1,1,2);
        System.out.println("购买商品成功");
    }
}
